package com.hzdp.dao;

import com.google.common.collect.Maps;
import com.hzdp.bean.RivalProduct;
import com.hzdp.dao.po.RivalCategoryPO;
import com.hzdp.dao.po.RivalProductPO;
import org.springframework.stereotype.Service;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

/**
 * Created by lyp on 15/12/26.
 */
@Service("rivalCategoryDao")
public class RivalCategoryDao extends BaseDao {

    public RivalCategoryPO getRivalCategoryByName(String categoryName1,String categoryName2) throws SQLException {
        Map<String,Object> paramMap = Maps.newHashMap();
        paramMap.put("categoryName1",categoryName1);
        paramMap.put("categoryName2",categoryName2);
        return (RivalCategoryPO) queryObject("RivalCategory.getRivalCategoryByName",paramMap);
    }

    public Integer insert(RivalCategoryPO rivalProductPO) throws SQLException {
        return (Integer) insert("RivalCategory.insert",rivalProductPO);
    }
}
